package com.hoas.api.manager.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class CommonPageController {

    @RequestMapping("/{page}.html")
    public String toPage(@PathVariable String page) {
        return page;
    }

    @RequestMapping("/{pkg}/{page}.html")
    public String toPage(@PathVariable String pkg, @PathVariable String page) {
        return pkg + "/" + page;
    }

    @RequestMapping("/{pkg1}/{pkg2}/{page}.html")
    public String toPage(@PathVariable String pkg1,@PathVariable String pkg2, @PathVariable String page) {
        return pkg1 + "/" + pkg2 + "/" + page;
    }

}
